package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_pms_h_cont database table.
 * 
 */
@Entity
@Table(name="per_pms_h_cont")
@NamedQuery(name="PerPmsHCont.findAll", query="SELECT p FROM PerPmsHCont p")
public class PerPmsHCont implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int contid;

	private String contbs;

	private int contts;

	//bi-directional many-to-one association to PerPmsHCes
	@OneToMany(mappedBy="perPmsHCont")
	private List<PerPmsHCes> perPmsHCes;

	//bi-directional many-to-one association to PerPmsZhiji
	@ManyToOne
	@JoinColumn(name="ZHIJIID")
	private PerPmsZhiji perPmsZhiji;

	public PerPmsHCont() {
	}

	public int getContid() {
		return this.contid;
	}

	public void setContid(int contid) {
		this.contid = contid;
	}

	public String getContbs() {
		return this.contbs;
	}

	public void setContbs(String contbs) {
		this.contbs = contbs;
	}

	public int getContts() {
		return this.contts;
	}

	public void setContts(int contts) {
		this.contts = contts;
	}

	public List<PerPmsHCes> getPerPmsHCes() {
		return this.perPmsHCes;
	}

	public void setPerPmsHCes(List<PerPmsHCes> perPmsHCes) {
		this.perPmsHCes = perPmsHCes;
	}

	public PerPmsHCes addPerPmsHCe(PerPmsHCes perPmsHCe) {
		getPerPmsHCes().add(perPmsHCe);
		perPmsHCe.setPerPmsHCont(this);

		return perPmsHCe;
	}

	public PerPmsHCes removePerPmsHCe(PerPmsHCes perPmsHCe) {
		getPerPmsHCes().remove(perPmsHCe);
		perPmsHCe.setPerPmsHCont(null);

		return perPmsHCe;
	}

	public PerPmsZhiji getPerPmsZhiji() {
		return this.perPmsZhiji;
	}

	public void setPerPmsZhiji(PerPmsZhiji perPmsZhiji) {
		this.perPmsZhiji = perPmsZhiji;
	}

}